Skip to main content
Version: 2.0

Create Flow

Creating a Flow:

New Flows are created in DRAFT status by default.

Request Type: POST

Sample Request:

curl -X POST '{BASE-URL}/{WABA-ID}/flows' \
--header 'Authorization: Bearer {ACCESS-TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Test flow Backend 2",
"categories": [ "OTHER" ],
"flow_json" : "{\"version\":\"5.0\",\"screens\":[{\"id\":\"WELCOME_SCREEN\",\"layout\":{\"type\":\"SingleColumnLayout\",\"children\":[{\"type\":\"TextHeading\",\"text\":\"Hello World\"},{\"type\":\"Footer\",\"label\":\"Complete\",\"on-click-action\":{\"name\":\"complete\",\"payload\":{}}}]},\"title\":\"Welcome\",\"terminal\":true,\"success\":true,\"data\":{}}]}",
"publish" : false
}'
ParameterDescriptionJSON TypeRequired
nameFlow namestringYes
categoriesA list of Flow categories. Multiple values are possible, but at least one is required. Choose the values which represent your business use case. The list of values are below:

- SIGN_UP
- SIGN_IN
- APPOINTMENT_BOOKING
- LEAD_GENERATION
- CONTACT_US
- CUSTOMER_SUPPORT
- OTHER
arrayYes
flow_jsonFlow's JSON encoded as string.stringNo
publishIndicates whether the Flow should also be get published. This Only works if the flow_json is also provided with valid Flow JSON.booleanNo

Sample Response

{
"id": "<Flow-ID>",
"success": true,
"validation_errors": []
}